Skip to content

keybindings (wayland): Notify the shell of layout switches during a grab - #896

Open
SeniorMatt wants to merge 1 commit into
linuxmint:masterfrom
SeniorMatt:wayland-layout-switch-during-grab
Open

SeniorMatt wants to merge 1 commit into
linuxmint:masterfrom
SeniorMatt:wayland-layout-switch-during-grab

Conversation

@SeniorMatt

Copy link
Copy Markdown

With a layout toggle like grp:caps_toggle, pressing it while dragging a window switched the layout, but the Cinnamon indicator didn't follow, and the next press seemed to do nothing.

During a move/resize grab process_iso_next_group() is skipped, so modifiers-accelerator-activated is never emitted, while on Wayland xkbcommon has already switched the group. This runs it during the grab on Wayland only; X11 is unchanged, since there the handler can ungrab and end the move.

Tested on Mint 27 (Wayland): switching with Caps Lock during a drag works and the indicator follows.

…rab.

With a layout switch such as grp:caps_toggle, pressing it while dragging
a window switches the typing layout but the shell's indicator does not
follow, and the next press seems to do nothing.

During a move/resize grab window->all_keys_grabbed is TRUE and
process_key_event() skipped process_iso_next_group(), so
modifiers-accelerator-activated was never emitted. Under Wayland xkbcommon
has already applied the group change to the seat's xkb state, and the
native backend only emits keymap-layout-group-changed from
lock_layout_group(), so nothing else tells the shell.

Run process_iso_next_group() during the grab under Wayland too. Under X11
the handler may ungrab the keyboard and end the move grab, so keep the old
behaviour there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant